package com.qdu.entity;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

public class AlluserInfo implements UserDetails{

	
	private String rolename;
	private String rpassword;
	private Collection<GrantedAuthority> authorities;
	
	
	

	public AlluserInfo() {
		super();
	}

	

	public AlluserInfo(String rolename, String rpassword) {
		super();
		this.rolename = rolename;
		this.rpassword = rpassword;
	}



	public AlluserInfo(String rolename, String rpassword, Collection<GrantedAuthority> authorities) {
		super();
		this.rolename = rolename;
		this.rpassword = rpassword;
		this.authorities = authorities;
	}



	@Override
	public Collection<? extends GrantedAuthority> getAuthorities() {
		// TODO Auto-generated method stub
		return this.authorities;
	}

	@Override
	public String getPassword() {
		// TODO Auto-generated method stub
		return this.rpassword;
	}

	@Override
	public String getUsername() {
		// TODO Auto-generated method stub
		return this.rolename;
	}

	@Override
	public boolean isAccountNonExpired() {
		// TODO Auto-generated method stub
		return true;
	}

	@Override
	public boolean isAccountNonLocked() {
		// TODO Auto-generated method stub
		return true;
	}

	@Override
	public boolean isCredentialsNonExpired() {
		// TODO Auto-generated method stub
		return true;
	}

	@Override
	public boolean isEnabled() {
		// TODO Auto-generated method stub
		return true;
	}

}
